package service.impl;

import dao.UserDao;
import dao.impl.UserDaoImpl;
import model.User;
import service.UserService;

import java.sql.SQLException;
import java.util.ArrayList;

public class UserServiceImpl implements UserService {

    UserDao userDao = new UserDaoImpl();
    @Override
    public User getUserByName(String username) throws SQLException {
        return userDao.getUserByName(username);
    }

    @Override
    public ArrayList<User> getAllUser() {
        return userDao.getAllUser();
    }

    @Override
    public int addUser(User user) {
        return userDao.addUser(user);
    }
}
